package com.tjut.oop.hol3;

public abstract class Shape {
	// 面积属性
	private double area;
	// 周长属性
	private double per;
	// 颜色属性
	private String color;

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public void setArea(double area) {
		this.area = area;
	}

	public void setPer(double per) {
		this.per = per;
	}

	/**
	 * 抽象方法：获取面积
	 */
	public abstract void getArea();

	/**
	 * 抽象方法：获取周长
	 */
	public abstract void getPer();

	/**
	 * 抽象方法：展示图形
	 */
	public abstract void showAll();

	public void getcolor() {
		System.out.println("该图形的颜色为" + color);
	}

	public Shape() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Shape(String color) {
		super();
		this.color = color;
	}
}
